<template>
	<div>
		<el-card class="box-card">
			<div class="text item">
				<div class="hoverdivClass" v-for="(value, key) in propertyList" :key="key">
					<el-form ref="form" v-if="titleList[key]" label-position="left">
						<el-form-item :label="titleList[key]">
							<el-input v-model="propertyList[key]" type="textarea"></el-input>
						</el-form-item>
					</el-form>
				</div>
			</div>
		</el-card>
	</div>
</template>
<script>
export default {
	props: {
		getData: {
			type: Function,
			default: Function
		}
	},
	data() {
		return {
			titleList: {
				approvalDate: '核准日期',

				contractEndDate: '合同预计到期日（证监）',

				contractEndDatePeople: '合同预计到期日（人行）',

				deferRaiseDate: '延期募集备案日期',

				endListDate: '终止上市日',

				establishDate: '产品成立日期/合同生效日期',

				finishFilingDate: '完成备案日期',

				firstRedemptionDate: '首次打开赎回日',

				formalEvolveDate: '正式转型日期',

				initialFilingDate: '初始备案日期',

				liquidateAccompleteDate: '清盘完成日',

				liquidationStartDate: '清算开始日期',

				logonApprovalChangeDate: '注册批文变更日期',

				nextOpenFirstDate: '下次开放期首日',

				operateEndDate: '合同实际到期日',

				raiseStartDate: '募集起始日'
			},
			propertyList: {
				approvalDate: '',

				contractEndDate: '',

				deferRaiseDate: '',

				endListDate: '',

				establishDate: '',

				finishFilingDate: '',

				firstRedemptionDate: '',

				formalEvolveDate: '',

				initialFilingDate: '',

				liquidateAccompleteDate: '',

				liquidationStartDate: '',

				logonApprovalChangeDate: '',

				nextOpenFirstDate: '',

				operateEndDate: '',

				raiseStartDate: '',
				contractEndDatePeople: ''
			}
		}
	},
	methods: {
		saveSetings() {
			return this.propertyList
		},
		edit(data) {
			const obj = JSON.parse(JSON.stringify(data))
			this.propertyList = { ...this.propertyList, ...obj }
			for (const i in this.propertyList) {
				if (!this.propertyList[i]) {
					this.propertyList[i] = ''
				}
			}
		}
	}
}
</script>
<style lang="scss" scoped >
</style>
